package dk.au.transxor.message;

public class MessageFactory {
	
	public static final int DirectMessasge_AmType = DirectMessage.AM_TYPE;
	public static final int XORMessasge_AmType = XORMessage.AM_TYPE;

	public static IMessage createMessage(int amType) {
		
		if (amType == DirectMessasge_AmType) {
			return new DirectMessage();
		} else if (amType == XORMessasge_AmType) {
			return new XORMessage();
		}

		System.out.println("Unknown am type! MessageFactory");

		return null;
	}

}
